<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>我的预约 - 智能洗护中心</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#35C2C1',
                        secondary: '#FF7D00',
                        success: '#22C55E',
                        danger: '#EF4444',
                        dark: '#333333',
                        light: '#F5F5F5',
                        gray: '#999999',
                        lightgray: '#EEEEEE'
                    },
                    fontFamily: {
                        sans: ['PingFang SC', 'Helvetica Neue', 'Arial', 'sans-serif']
                    }
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .tab-active {
                color: #35C2C1;
                border-color: #35C2C1;
            }
            .record-item {
                transition: all 0.2s ease;
            }
            .record-item:hover {
                transform: translateY(-2px);
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            }
            .badge {
                display: inline-block;
                padding: 0.15rem 0.4rem;
                border-radius: 12px;
                font-size: 0.75rem;
                font-weight: 500;
            }
            .fade-in {
                animation: fadeIn 0.3s ease-out;
            }
            @keyframes fadeIn {
                from { opacity: 0; transform: translateY(10px); }
                to { opacity: 1; transform: translateY(0); }
            }
        }
    </style>
</head>
<body class="bg-light font-sans text-dark min-h-screen">
    <!-- 小程序容器 -->
    <div class="max-w-md mx-auto bg-white min-h-screen relative">
        <!-- 顶部导航栏 -->
        <header class="bg-white text-dark py-4 px-5 flex justify-between items-center fixed top-0 left-0 right-0 max-w-md mx-auto z-10 border-b border-lightgray">
            <a href="my-page.html" class="text-dark">
                <i class="fa fa-arrow-left text-lg"></i>
            </a>
            <div class="text-lg font-bold">我的预约</div>
            <div class="w-6"></div> <!-- 占位元素，使标题居中 -->
        </header>

        <!-- 主内容区 -->
        <main class="pt-16 pb-16">
            <!-- 搜索栏 -->
            <div class="bg-white p-4 border-b border-lightgray">
                <div class="relative">
                    <input type="text" placeholder="搜索预约记录..." class="w-full pl-10 pr-4 py-2 border border-lightgray rounded-lg text-sm focus:outline-none focus:border-primary">
                    <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray"></i>
                </div>
            </div>
            
            <!-- 状态切换Tabs -->
            <div class="bg-white border-b border-lightgray overflow-x-auto">
                <div class="flex">
                    <button class="tab-btn flex items-center px-4 py-3 text-primary border-b-2 border-primary font-medium whitespace-nowrap" data-tab="all">
                        <i class="fa fa-list-ul mr-2"></i>
                        <span>全部预约</span>
                    </button>
                    <button class="tab-btn flex items-center px-4 py-3 text-gray border-b-2 border-transparent whitespace-nowrap" data-tab="pending">
                        <i class="fa fa-clock-o mr-2"></i>
                        <span>待服务</span>
                    </button>
                    <button class="tab-btn flex items-center px-4 py-3 text-gray border-b-2 border-transparent whitespace-nowrap" data-tab="completed">
                        <i class="fa fa-check-circle mr-2"></i>
                        <span>已完成</span>
                    </button>
                    <button class="tab-btn flex items-center px-4 py-3 text-gray border-b-2 border-transparent whitespace-nowrap" data-tab="canceled">
                        <i class="fa fa-times-circle mr-2"></i>
                        <span>已取消</span>
                    </button>
                </div>
            </div>
            
            <!-- 预约记录列表 -->
            <div class="bg-white">
                <!-- 全部预约内容 -->
                <div class="tab-content" id="all">
                    <div class="divide-y divide-lightgray">
                        <!-- 待服务预约 -->
                        <div class="record-item p-4 cursor-pointer" onclick="window.location='appointment-detail.html'">
                            <div class="flex justify-between">
                                <span class="text-sm font-medium">智能洗护中心(北京路店)</span>
                                <span class="text-xs badge bg-primary/10 text-primary">待服务</span>
                            </div>
                            <div class="flex justify-between mt-3">
                                <div>
                                    <p class="text-sm">AI智能基础洗头</p>
                                    <p class="text-xs text-gray mt-1">2023-11-15 16:00</p>
                                    <p class="text-xs text-gray mt-1">机器人03 | 预约编号: #2023111503</p>
                                </div>
                                <div class="text-right">
                                    <p class="text-sm font-medium text-secondary">¥39</p>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 已完成预约 -->
                        <div class="record-item p-4 cursor-pointer" onclick="window.location='appointment-detail.html'">
                            <div class="flex justify-between">
                                <span class="text-sm font-medium">智能洗护中心(天河店)</span>
                                <span class="text-xs badge bg-success/10 text-success">已完成</span>
                            </div>
                            <div class="flex justify-between mt-3">
                                <div>
                                    <p class="text-sm">深层清洁头皮护理</p>
                                    <p class="text-xs text-gray mt-1">2023-11-10 14:30</p>
                                    <p class="text-xs text-gray mt-1">机器人01 | 预约编号: #2023111001</p>
                                </div>
                                <div class="text-right">
                                    <p class="text-sm font-medium text-gray">¥69</p>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 已取消预约 -->
                        <div class="record-item p-4 cursor-pointer opacity-80" onclick="window.location='appointment-detail.html'">
                            <div class="flex justify-between">
                                <span class="text-sm font-medium">智能洗护中心(珠江新城店)</span>
                                <span class="text-xs badge bg-gray/10 text-gray">已取消</span>
                            </div>
                            <div class="flex justify-between mt-3">
                                <div>
                                    <p class="text-sm">染发后护理套餐</p>
                                    <p class="text-xs text-gray mt-1">2023-11-05 10:00</p>
                                    <p class="text-xs text-gray mt-1">机器人02 | 预约编号: #2023110502</p>
                                </div>
                                <div class="text-right">
                                    <p class="text-sm font-medium text-gray">¥99</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 待服务预约内容 -->
                <div class="tab-content hidden" id="pending">
                    <div class="divide-y divide-lightgray">
                        <!-- 待服务预约1 -->
                        <div class="record-item p-4 cursor-pointer" onclick="window.location='appointment-detail.html'">
                            <div class="flex justify-between">
                                <span class="text-sm font-medium">智能洗护中心(北京路店)</span>
                                <span class="text-xs badge bg-primary/10 text-primary">待服务</span>
                            </div>
                            <div class="flex justify-between mt-3">
                                <div>
                                    <p class="text-sm">AI智能基础洗头</p>
                                    <p class="text-xs text-gray mt-1">2023-11-15 16:00</p>
                                    <p class="text-xs text-gray mt-1">机器人03 | 预约编号: #2023111503</p>
                                </div>
                                <div class="text-right">
                                    <p class="text-sm font-medium text-secondary">¥39</p>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 待服务预约2 -->
                        <div class="record-item p-4 cursor-pointer" onclick="window.location='appointment-detail.html'">
                            <div class="flex justify-between">
                                <span class="text-sm font-medium">智能洗护中心(海珠店)</span>
                                <span class="text-xs badge bg-primary/10 text-primary">待服务</span>
                            </div>
                            <div class="flex justify-between mt-3">
                                <div>
                                    <p class="text-sm">高级头皮检测套餐</p>
                                    <p class="text-xs text-gray mt-1">2023-11-18 10:30</p>
                                    <p class="text-xs text-gray mt-1">机器人02 | 预约编号: #2023111802</p>
                                </div>
                                <div class="text-right">
                                    <p class="text-sm font-medium text-secondary">¥129</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 已完成预约内容 -->
                <div class="tab-content hidden" id="completed">
                    <div class="divide-y divide-lightgray">
                        <!-- 已完成预约1 -->
                        <div class="record-item p-4 cursor-pointer" onclick="window.location='appointment-detail.html'">
                            <div class="flex justify-between">
                                <span class="text-sm font-medium">智能洗护中心(天河店)</span>
                                <span class="text-xs badge bg-success/10 text-success">已完成</span>
                            </div>
                            <div class="flex justify-between mt-3">
                                <div>
                                    <p class="text-sm">深层清洁头皮护理</p>
                                    <p class="text-xs text-gray mt-1">2023-11-10 14:30</p>
                                    <p class="text-xs text-gray mt-1">机器人01 | 预约编号: #2023111001</p>
                                </div>
                                <div class="text-right">
                                    <p class="text-sm font-medium text-gray">¥69</p>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 已完成预约2 -->
                        <div class="record-item p-4 cursor-pointer" onclick="window.location='appointment-detail.html'">
                            <div class="flex justify-between">
                                <span class="text-sm font-medium">智能洗护中心(北京路店)</span>
                                <span class="text-xs badge bg-success/10 text-success">已完成</span>
                            </div>
                            <div class="flex justify-between mt-3">
                                <div>
                                    <p class="text-sm">AI智能基础洗头</p>
                                    <p class="text-xs text-gray mt-1">2023-11-01 09:30</p>
                                    <p class="text-xs text-gray mt-1">机器人03 | 预约编号: #2023110103</p>
                                </div>
                                <div class="text-right">
                                    <p class="text-sm font-medium text-gray">¥39</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 已取消预约内容 -->
                <div class="tab-content hidden" id="canceled">
                    <div class="divide-y divide-lightgray">
                        <!-- 已取消预约1 -->
                        <div class="record-item p-4 cursor-pointer opacity-80" onclick="window.location='appointment-detail.html'">
                            <div class="flex justify-between">
                                <span class="text-sm font-medium">智能洗护中心(珠江新城店)</span>
                                <span class="text-xs badge bg-gray/10 text-gray">已取消</span>
                            </div>
                            <div class="flex justify-between mt-3">
                                <div>
                                    <p class="text-sm">染发后护理套餐</p>
                                    <p class="text-xs text-gray mt-1">2023-11-05 10:00</p>
                                    <p class="text-xs text-gray mt-1">机器人02 | 预约编号: #2023110502</p>
                                </div>
                                <div class="text-right">
                                    <p class="text-sm font-medium text-gray">¥99</p>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 已取消预约2 -->
                        <div class="record-item p-4 cursor-pointer opacity-80" onclick="window.location='appointment-detail.html'">
                            <div class="flex justify-between">
                                <span class="text-sm font-medium">智能洗护中心(海珠店)</span>
                                <span class="text-xs badge bg-gray/10 text-gray">已取消</span>
                            </div>
                            <div class="flex justify-between mt-3">
                                <div>
                                    <p class="text-sm">头皮按摩放松</p>
                                    <p class="text-xs text-gray mt-1">2023-10-28 15:00</p>
                                    <p class="text-xs text-gray mt-1">机器人01 | 预约编号: #2023102801</p>
                                </div>
                                <div class="text-right">
                                    <p class="text-sm font-medium text-gray">¥49</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 加载更多 -->
                <div class="text-center py-4">
                    <button class="px-6 py-2 border border-primary text-primary rounded-full text-sm flex items-center justify-center mx-auto">
                        <i class="fa fa-refresh mr-1"></i>
                        加载更多
                    </button>
                </div>
            </div>
        </main>

        <!-- 底部导航 -->
        <footer class="fixed bottom-0 left-0 right-0 max-w-md mx-auto bg-white border-t border-lightgray py-2 px-8">
            <div class="flex justify-between">
                <a href="index.html" class="flex flex-col items-center text-gray">
                    <i class="fa fa-home text-lg"></i>
                    <span class="text-xs mt-1">首页</span>
                </a>
                <a href="store-list.html" class="flex flex-col items-center text-gray">
                    <i class="fa fa-map-marker text-lg"></i>
                    <span class="text-xs mt-1">门店</span>
                </a>
                <a href="appointment.html" class="flex flex-col items-center text-gray">
                    <i class="fa fa-calendar text-lg"></i>
                    <span class="text-xs mt-1">预约</span>
                </a>
                <a href="my-page.html" class="flex flex-col items-center text-primary">
                    <i class="fa fa-user text-lg"></i>
                    <span class="text-xs mt-1">我的</span>
                </a>
            </div>
        </footer>
    </div>

    <script>
        // Tabs切换功能
        document.querySelectorAll('.tab-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                // 移除所有标签的活跃状态
                document.querySelectorAll('.tab-btn').forEach(el => {
                    el.classList.remove('text-primary', 'border-primary');
                    el.classList.add('text-gray', 'border-transparent');
                });
                
                // 设置当前标签为活跃状态
                this.classList.remove('text-gray', 'border-transparent');
                this.classList.add('text-primary', 'border-primary');
                
                // 隐藏所有内容
                document.querySelectorAll('.tab-content').forEach(content => {
                    content.classList.add('hidden');
                });
                
                // 显示对应内容
                const tabId = this.getAttribute('data-tab');
                const activeContent = document.getElementById(tabId);
                activeContent.classList.remove('hidden');
                activeContent.classList.add('fade-in');
            });
        });
        
        // 底部导航交互
        document.querySelectorAll('footer a').forEach(link => {
            link.addEventListener('click', function(e) {
                e.preventDefault();
                document.querySelectorAll('footer a').forEach(el => {
                    el.classList.remove('text-primary');
                    el.classList.add('text-gray');
                });
                this.classList.add('text-primary');
                this.classList.remove('text-gray');
            });
        });
    </script>
</body>
</html>
    